package com.itjob.scott.dao;

public class CallParameter {
	
	public static final int IN=1;
	public static final int OUT=2;
	public static final int INOUT=3;
	
	/**
	 * 参数的名称
	 */
	private String name;
	
	
	/**
	 * 参数的值
	 */
	private Object value;
	
	/**
	 * 参数的类型
	 */
	private int mode; //1:IN, 2:OUT, 3:INOUT
	
	/**
	 * 参数的类型  
	 */
	private int type;
	
	/**
	 * 返回值的下标
	 */
	private int returnIndex;

	public CallParameter(){
		
	}
	
	/**
	 * 调用存储过程的时候需要传递的参数
	 * //设置入参
	 * cs.setString(1, a);
	 * cs.setInt(2, b);
	 * 
	 * //设置出参的返回值类型
	 * cs.registerOutParameter(3, Types.VARCHAR); //设置s的值
	 * cs.registerOutParameter(4, Types.VARCHAR); //设置c的值
	 * @param name
	 * @param value
	 * @param mode
	 * @param type
	 */
	public CallParameter(String name, Object value, int mode, int type) {
		super();
		this.name = name;
		this.value = value;
		this.mode = mode;
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}
	public int getMode() {
		return mode;
	}
	public void setMode(int mode) {
		this.mode = mode;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getReturnIndex() {
		return returnIndex;
	}
	public void setReturnIndex(int returnIndex) {
		this.returnIndex = returnIndex;
	}
	
	
	
	
	
	
	

}
